
#import <UIKit/UIKit.h>
#define kCommunityLocationViewHeight 20     // CommunityLocationView的高度
#define kCommunityLocationViewWidth 66     // CommunityLocationView的默认宽度
#define kCommunityLocationViewHasLocationWidth 81     // CommunityLocationView有location的默认宽度
#define kCommunityLocationViewMargin 8     // 内容和边框间距
#define kCommunityLocationViewLocationMargin 5     // 内容和坐标间距
#define kCommunityLocationViewViewMargin 15     // 控件与边界间距

#if __has_include(<Commom/SEGText.h>)
#import <Commom/SEGText.h>
#else
#import "SEGText.h"
#endif

typedef NS_ENUM(NSUInteger, SEGEnumCommunityLocationViewType) {
    SEGEnumCommunityLocationViewType_NO = 0, /*默认*/
    SEGEnumCommunityLocationViewType_Location = 1, /*显示location坐标*/
    SEGEnumCommunityLocationViewType_LuNeng = 2 // 的样式
};

@protocol protocolCommunityLocationViewDelegate <NSObject>
@optional
-(void)protocolcommunityLabel:(SEGLabel*)sender type:(SEGEnumCommunityLocationViewType)type;
@end

@interface SEGCommunityLocationViewModel : NSObject
@property (nonatomic, copy) NSString *communityName; // 小区名
@end

@interface SEGCommunityLocationViewLayout : NSObject
@property (nonatomic, assign) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign) CGFloat totalWidth;//控件总宽度
@property (nonatomic, assign) CGFloat contentWidth;//内容宽
@property (nonatomic, assign) SEGEnumCommunityLocationViewType type;//控件类型
//@property (nonatomic, strong)SEGCommunityLocationViewModel *data;
@property (nonatomic, copy) NSString *communityName;
- (instancetype)initWithData:(NSString *)communityName type:(SEGEnumCommunityLocationViewType)type;
-(void)segCommunityLocationViewLayout;

@property (nonatomic, assign) CGFloat communityLabelHeight;//communityLabel 高度
@property (nonatomic, strong) SEGTextLayout *communityLabelTextLayout;//communityLabel 富文本布局

@end

@interface SEGCommunityLocationView : UIView
@property (nonatomic, strong)SEGCommunityLocationViewLayout *layout;
- (void)setWithLayout:(SEGCommunityLocationViewLayout *)layout;

@property (nonatomic, strong) SEGLabel *communityLabel; //

@property (nonatomic, strong) UIImageView *locationImageView; //
@property (nonatomic, strong) UIImageView *menuImageView; //

@property (nonatomic, assign) id<protocolCommunityLocationViewDelegate> delegate;// 代理
@end

